<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改鸡入库')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncInputChicken-edit" th:object="${ncInputChicken}">
            <input id="inputId" name="inputId" th:field="*{inputId}"  type="hidden">
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">入栏批次：</label>
				<div class="col-sm-8">
					<input id="inputCode" name="inputCode" th:field="*{inputCode}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">入栏鸡品种：</label>
				<div class="col-sm-8">
					<select name="inputVarieties" required class="form-control m-b" th:with="type=${@dict.getType('chicken_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{inputVarieties}" ></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">供应商：</label>
				<div class="col-sm-8">
					<input id="supplier" name="supplier" th:field="*{supplier}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">检疫合格证（有/无）：</label>
				<div class="col-sm-8">
					<select name="isHege" required class="form-control m-b" th:with="type=${@dict.getType('chickenIsHege')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isHege}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">数量（只）：</label>
				<div class="col-sm-8">
					<input id="inputAmount" name="inputAmount" th:field="*{inputAmount}" class="form-control" type="number"onkeyup=" value=value.replace(/^(0+)|[^\d]+/g,'')" required>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">入栏时间：</label>
				<div class="col-sm-8">
					<input type="text" style="height: 34px;" data-format="yyyy-MM-dd HH:mm:ss"  th:value="*{#dates.format(inputTime, 'yyyy-MM-dd HH:mm:ss')}" data-type="datetime" name="inputTime" class="time-input" id="inputTime" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入栏经手人：</label>
				<div class="col-sm-8">
					<input id="inputUser" name="inputUser" th:field="*{inputUser}" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark"  class="form-control valid" type="text" rows="4" th:field="*{remark}"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/ncInputChicken";
		$("#form-ncInputChicken-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-ncInputChicken-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
